<!doctype html>














<!-- `site.alt_lang` can specify a language different from the UI -->
<html lang="en" 
  
>
  <!-- The Head -->

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
  <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <meta
    name="viewport"
    content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
  >

  

  

  
    <!-- Begin Jekyll SEO tag v2.8.0 -->
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Numactl" />
<meta name="author" content="Chunsheng Luo" />
<meta property="og:locale" content="en" />
<meta name="description" content="numactl github: https://github.com/numactl/numactl" />
<meta property="og:description" content="numactl github: https://github.com/numactl/numactl" />
<link rel="canonical" href="https://luochenglcs.github.io/posts/numactl/" />
<meta property="og:url" content="https://luochenglcs.github.io/posts/numactl/" />
<meta property="og:site_name" content="Cheng Luo" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2021-09-10T00:00:00+00:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Numactl" />
<meta name="twitter:site" content="@luochenglcs" />
<meta name="twitter:creator" content="@Chunsheng Luo" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"Chunsheng Luo","url":"https://github.com/luochenglcs"},"dateModified":"2023-08-03T12:09:49+00:00","datePublished":"2021-09-10T00:00:00+00:00","description":"numactl github: https://github.com/numactl/numactl","headline":"Numactl","mainEntityOfPage":{"@type":"WebPage","@id":"https://luochenglcs.github.io/posts/numactl/"},"url":"https://luochenglcs.github.io/posts/numactl/"}</script>
<!-- End Jekyll SEO tag -->

  

  <title>Numactl | Cheng Luo
  </title>

  <!--
  The Favicons for Web, Android, Microsoft, and iOS (iPhone and iPad) Apps
  Generated by: https://realfavicongenerator.net/
-->



<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicons/favicon-16x16.png">
<link rel="manifest" href="/assets/img/favicons/site.webmanifest">
<link rel="shortcut icon" href="/assets/img/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Cheng Luo">
<meta name="application-name" content="Cheng Luo">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/assets/img/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">


  
    
      <link rel="preconnect" href="https://fonts.googleapis.com" >
      <link rel="dns-prefetch" href="https://fonts.googleapis.com" >
    
      <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
      <link rel="dns-prefetch" href="https://fonts.gstatic.com" crossorigin>
    
      <link rel="preconnect" href="https://fonts.googleapis.com" >
      <link rel="dns-prefetch" href="https://fonts.googleapis.com" >
    
      <link rel="preconnect" href="https://cdn.jsdelivr.net" >
      <link rel="dns-prefetch" href="https://cdn.jsdelivr.net" >
    

    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap">
  

  <!-- GA -->
  

  <!-- Bootstrap -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">

  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css">

  <link rel="stylesheet" href="/assets/css/style.css">

  
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tocbot@4.21.0/dist/tocbot.min.css">
  

  
    <!-- Manific Popup -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css">
  

  <!-- JavaScript -->

  
    <!-- Switch the mode between dark and light. -->

<script type="text/javascript">
  class ModeToggle {
    static get MODE_KEY() {
      return 'mode';
    }
    static get MODE_ATTR() {
      return 'data-mode';
    }
    static get DARK_MODE() {
      return 'dark';
    }
    static get LIGHT_MODE() {
      return 'light';
    }
    static get ID() {
      return 'mode-toggle';
    }

    constructor() {
      if (this.hasMode) {
        if (this.isDarkMode) {
          if (!this.isSysDarkPrefer) {
            this.setDark();
          }
        } else {
          if (this.isSysDarkPrefer) {
            this.setLight();
          }
        }
      }

      let self = this;

      /* always follow the system prefers */
      this.sysDarkPrefers.addEventListener('change', () => {
        if (self.hasMode) {
          if (self.isDarkMode) {
            if (!self.isSysDarkPrefer) {
              self.setDark();
            }
          } else {
            if (self.isSysDarkPrefer) {
              self.setLight();
            }
          }

          self.clearMode();
        }

        self.notify();
      });
    } /* constructor() */

    get sysDarkPrefers() {
      return window.matchMedia('(prefers-color-scheme: dark)');
    }

    get isSysDarkPrefer() {
      return this.sysDarkPrefers.matches;
    }

    get isDarkMode() {
      return this.mode === ModeToggle.DARK_MODE;
    }

    get isLightMode() {
      return this.mode === ModeToggle.LIGHT_MODE;
    }

    get hasMode() {
      return this.mode != null;
    }

    get mode() {
      return sessionStorage.getItem(ModeToggle.MODE_KEY);
    }

    /* get the current mode on screen */
    get modeStatus() {
      if (this.isDarkMode || (!this.hasMode && this.isSysDarkPrefer)) {
        return ModeToggle.DARK_MODE;
      } else {
        return ModeToggle.LIGHT_MODE;
      }
    }

    setDark() {
      document.documentElement.setAttribute(ModeToggle.MODE_ATTR, ModeToggle.DARK_MODE);
      sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE);
    }

    setLight() {
      document.documentElement.setAttribute(ModeToggle.MODE_ATTR, ModeToggle.LIGHT_MODE);
      sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE);
    }

    clearMode() {
      document.documentElement.removeAttribute(ModeToggle.MODE_ATTR);
      sessionStorage.removeItem(ModeToggle.MODE_KEY);
    }

    /* Notify another plugins that the theme mode has changed */
    notify() {
      window.postMessage(
        {
          direction: ModeToggle.ID,
          message: this.modeStatus
        },
        '*'
      );
    }

    flipMode() {
      if (this.hasMode) {
        if (this.isSysDarkPrefer) {
          if (this.isLightMode) {
            this.clearMode();
          } else {
            this.setLight();
          }
        } else {
          if (this.isDarkMode) {
            this.clearMode();
          } else {
            this.setDark();
          }
        }
      } else {
        if (this.isSysDarkPrefer) {
          this.setLight();
        } else {
          this.setDark();
        }
      }

      this.notify();
    } /* flipMode() */
  } /* ModeToggle */

  const modeToggle = new ModeToggle();
</script>

  

  <!-- A placeholder to allow defining custom metadata -->

</head>


  <body>
    <!-- The Side Bar -->

<div id="sidebar" class="d-flex flex-column align-items-end">
  <div class="profile-wrapper">
    <a href="/" id="avatar" class="rounded-circle">
      
        
        <img src="/assets/img/favicons/android-chrome-512x512.png" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
      
    </a>

    <div class="site-title">
      <a href="/">Cheng Luo</a>
    </div>
    <div class="site-subtitle fst-italic">Linux operating system engineer</div>
  </div>
  <!-- .profile-wrapper -->

  <ul class="nav flex-column flex-grow-1 w-100 ps-0">
    <!-- home -->
    <li class="nav-item">
      <a href="/" class="nav-link">
        <i class="fa-fw fas fa-home"></i>
        <span>HOME</span>
      </a>
    </li>
    <!-- the real tabs -->
    
      <li class="nav-item">
        <a href="/categories/" class="nav-link">
          <i class="fa-fw fas fa-stream"></i>
          

          <span>CATEGORIES</span>
        </a>
      </li>
      <!-- .nav-item -->
    
      <li class="nav-item">
        <a href="/tags/" class="nav-link">
          <i class="fa-fw fas fa-tags"></i>
          

          <span>TAGS</span>
        </a>
      </li>
      <!-- .nav-item -->
    
      <li class="nav-item">
        <a href="/archives/" class="nav-link">
          <i class="fa-fw fas fa-archive"></i>
          

          <span>ARCHIVES</span>
        </a>
      </li>
      <!-- .nav-item -->
    
      <li class="nav-item">
        <a href="/about/" class="nav-link">
          <i class="fa-fw fas fa-info-circle"></i>
          

          <span>ABOUT</span>
        </a>
      </li>
      <!-- .nav-item -->
    
  </ul>
  <!-- ul.nav.flex-column -->

  <div class="sidebar-bottom d-flex flex-wrap  align-items-center w-100">
    
      <button class="mode-toggle btn" aria-label="Switch Mode">
        <i class="fas fa-adjust"></i>
      </button>

      
        <span class="icon-border"></span>
      
    

    
      

      
        <a
          href="https://github.com/luochenglcs"
          aria-label="github"
          

          
            target="_blank"
            
          

          

          
            rel="noopener noreferrer"
          
        >
          <i class="fab fa-github"></i>
        </a>
      
    
      

      
    
      

      
        <a
          href="javascript:location.href = 'mailto:' + ['luochunsheng','ustc.edu'].join('@')"
          aria-label="email"
          

          

          

          
        >
          <i class="fas fa-envelope"></i>
        </a>
      
    
  </div>
  <!-- .sidebar-bottom -->
</div>
<!-- #sidebar -->


    <div id="main-wrapper" class="d-flex justify-content-center">
      <div id="main" class="container px-xxl-5">
        <!-- The Top Bar -->

<div id="topbar-wrapper">
  <div
    id="topbar"
    class="container d-flex align-items-center justify-content-between h-100"
  >
    <span id="breadcrumb">
      

      
        
          
            <span>
              <a href="/">
                Home
              </a>
            </span>

          
        
          
        
          
            
              <span>Numactl</span>
            

          
        
      
    </span>
    <!-- endof #breadcrumb -->

    <i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>

    <div id="topbar-title">
      Post
    </div>

    <i id="search-trigger" class="fas fa-search fa-fw"></i>
    <span id="search-wrapper" class="align-items-center">
      <i class="fas fa-search fa-fw"></i>
      <input
        class="form-control"
        id="search-input"
        type="search"
        aria-label="search"
        autocomplete="off"
        placeholder="Search..."
      >
    </span>
    <span id="search-cancel">Cancel</span>
  </div>
</div>

        











<div class="row">
  <!-- core -->
  <div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pe-xl-4">
    

    <div class="post px-1 px-md-2">
      

      
        
      
        <!-- Refactor the HTML structure -->



<!--
  In order to allow a wide table to scroll horizontally,
  we suround the markdown table with `<div class="table-wrapper">` and `</div>`
-->



<!--
  Fixed kramdown code highlight rendering:
  https://github.com/penibelst/jekyll-compress-html/issues/101
  https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
-->



<!-- Change the icon of checkbox -->


<!-- images -->




<!-- Add header for code snippets -->



<!-- Create heading anchors -->





  
  

  

  
  

  
    
    

    
      
        
        
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    

    

  

  
  

  
    
    

    
      
        
        
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    
      

      
      

      
      
      

      

    

    

  

  
  

  




<!-- return -->




<h1 data-toc-skip>Numactl</h1>

<div class="post-meta text-muted">
    <!-- published date -->
    <span>
      Posted
      <!--
  Date format snippet
  See: ${JS_ROOT}/utils/locale-dateime.js
-->





<em
  class=""
  data-ts="1631232000"
  data-df="ll"
  
    data-bs-toggle="tooltip" data-bs-placement="bottom"
  
>
  Sep 10, 2021
</em>

    </span>

    <!-- lastmod date -->
    
    <span>
      Updated
      <!--
  Date format snippet
  See: ${JS_ROOT}/utils/locale-dateime.js
-->





<em
  class=""
  data-ts="1691064589"
  data-df="ll"
  
    data-bs-toggle="tooltip" data-bs-placement="bottom"
  
>
  Aug  3, 2023
</em>

    </span>
    

  

  <div class="d-flex justify-content-between">
    <!-- author(s) -->
    <span>
      

      By

      <em>
      
        
          <a href="https://github.com/luochenglcs">Chunsheng Luo</a>
          
        
      
      </em>
    </span>

    <div>
      <!-- read time -->
      <!-- Calculate the post's reading time, and display the word count in tooltip -->



<!-- words per minute -->










<!-- return element -->
<span
  class="readtime"
  data-bs-toggle="tooltip"
  data-bs-placement="bottom"
  title="3349 words"
>
  <em>18 min</em> read</span>

    </div>

  </div> <!-- .d-flex -->

</div> <!-- .post-meta -->
<div class="post-content">
  <p>numactl github:
https://github.com/numactl/numactl</p>

<h3 id="一-numa技术"><span class="me-2">一 NUMA技术</span><a href="#一-numa技术" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
</pre></td><td class="rouge-code"><pre><span class="nl">https:</span><span class="c1">//blog.csdn.net/don_chiang709/article/details/100735052</span>
<span class="n">NUMA</span><span class="err">技术将</span><span class="n">CPU</span><span class="err">划分成不同的组（</span><span class="n">Node</span><span class="p">)</span><span class="err">，每个</span><span class="n">Node</span><span class="err">由多个</span><span class="n">CPU</span><span class="err">组成，并且有独立的本地内存、</span><span class="n">I</span><span class="o">/</span><span class="n">O</span><span class="err">等资源。</span><span class="n">Node</span><span class="err">之间通过互联模块连接和沟通，因此除了本地内存外，每个</span><span class="n">CPU</span><span class="err">仍可以访问远端</span><span class="n">Node</span><span class="err">的内存，只不过效率会比访问本地内存差一些，我们用</span><span class="n">Node</span><span class="err">之间的距离（</span><span class="n">Distance</span><span class="err">，抽象的概念）来定义各个</span><span class="n">Node</span><span class="err">之间互访资源的开销。</span>
<span class="o">**</span><span class="n">Node</span><span class="o">-&gt;</span><span class="n">Socket</span><span class="o">-&gt;</span><span class="n">Core</span><span class="o">-&gt;</span><span class="n">Processor</span><span class="o">**</span>
<span class="err">随着多核技术的发展，将多个</span><span class="n">CPU</span><span class="err">封装在一起，这个封装被称为插槽</span><span class="n">Socket</span><span class="err">；</span><span class="n">Core</span><span class="err">是</span><span class="n">socket</span><span class="err">上独立的硬件单元；通过</span><span class="n">intel</span><span class="err">的超线程</span><span class="n">HT</span><span class="err">技术进一步提升</span><span class="n">CPU</span><span class="err">的处理能力，</span><span class="n">OS</span><span class="err">看到的逻辑上的核数</span><span class="n">Processor</span><span class="err">。</span>
<span class="o">**</span><span class="n">socket</span> <span class="o">=</span> <span class="n">node</span><span class="o">**</span>
<span class="n">socket</span><span class="err">是物理概念，指的是主板上</span><span class="n">CPU</span><span class="err">插槽；</span><span class="n">node</span><span class="err">是逻辑概念，对应于</span><span class="n">socket</span><span class="err">。</span>
<span class="o">**</span><span class="n">core</span> <span class="o">=</span> <span class="err">物理</span><span class="n">CPU</span><span class="o">**</span>
<span class="n">core</span><span class="err">是物理概念，一个独立的硬件执行单元，对应于物理</span><span class="n">CPU</span><span class="err">；</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
</pre></td><td class="rouge-code"><pre><span class="nl">https:</span><span class="c1">//www.cnblogs.com/machangwei-8/p/10402644.html</span>
<span class="err">由于</span><span class="n">SMP</span><span class="err">在扩展能力上的限制，人们开始探究如何进行有效地扩展从而构建大型系统的技术，</span><span class="n">NUMA</span><span class="err">就是这种努力下的结果之一。利用</span><span class="n">NUMA</span><span class="err">技术，可以把几十个</span><span class="n">CPU</span><span class="p">(</span><span class="err">甚至上百个</span><span class="n">CPU</span><span class="p">)</span><span class="err">组合在一个服务器内。</span><span class="n">NUMA</span><span class="err">服务器的基本特征是具有多个</span><span class="n">CPU</span><span class="err">模块，每个</span><span class="n">CPU</span><span class="err">模块由多个</span><span class="n">CPU</span><span class="p">(</span><span class="err">如</span><span class="mi">4</span><span class="err">个</span><span class="p">)</span><span class="err">组成，并且具有独立的本地内存、</span><span class="n">I</span><span class="o">/</span><span class="n">O</span><span class="err">槽口等。由于其节点之间可以通过互联模块</span><span class="p">(</span><span class="err">如称为</span><span class="n">Crossbar</span> <span class="n">Switch</span><span class="p">)</span><span class="err">进行连接和信息交互，因此每个</span><span class="n">CPU</span><span class="err">可以访问整个系统的内存</span><span class="p">(</span><span class="err">这是</span><span class="n">NUMA</span><span class="err">系统与</span><span class="n">MPP</span><span class="err">系统的重要差别</span><span class="p">)</span><span class="err">。显然，访问本地内存的速度将远远高于访问远地内存</span><span class="p">(</span><span class="err">系统内其它节点的内存</span><span class="p">)</span><span class="err">的速度，这也是非一致存储访问</span><span class="n">NUMA</span><span class="err">的由来。由于这个特点，为了更好地发挥系统性能，开发应用程序时需要尽量减少不同</span><span class="n">CPU</span><span class="err">模块之间的信息交互。利用</span><span class="n">NUMA</span><span class="err">技术，可以较好地解决原来</span><span class="n">SMP</span><span class="err">系统的扩展问题，在一个物理服务器内可以支持上百个</span><span class="n">CPU</span><span class="err">。比较典型的</span><span class="n">NUMA</span><span class="err">服务器的例子包括</span><span class="n">HP</span><span class="err">的</span><span class="n">Superdome</span><span class="err">、</span><span class="n">SUN15K</span><span class="err">、</span><span class="n">IBMp690</span><span class="err">等。</span>
<span class="err">每个</span><span class="n">CPU</span><span class="err">模块之间都是通过互联模块进行连接和信息交互，</span><span class="n">CPU</span><span class="err">都是互通互联的，同时，每个</span><span class="n">CPU</span><span class="err">模块平均划分为若干个</span><span class="n">Chip</span><span class="err">（不多于</span><span class="mi">4</span><span class="err">个），每个</span><span class="n">Chip</span><span class="err">都有自己的内存控制器及内存插槽。</span>
<span class="err">在</span><span class="n">NUMA</span><span class="err">中还有三个节点的概念：</span>
<span class="mi">1</span><span class="err">）、本地节点</span><span class="o">:</span><span class="err">对于某个节点中的所有</span><span class="n">CPU</span><span class="err">，此节点称为本地节点。</span>
<span class="mi">2</span><span class="err">）、邻居节点</span><span class="o">:</span><span class="err">与本地节点相邻的节点称为邻居节点。</span>
<span class="mi">3</span><span class="err">）、远端节点</span><span class="o">:</span><span class="err">非本地节点或邻居节点的节点，称为远端节点。</span>
<span class="mi">4</span><span class="err">）、邻居节点和远端节点</span><span class="p">,</span><span class="err">都称作非本地节点</span><span class="p">(</span><span class="n">Off</span> <span class="n">Node</span><span class="p">)</span><span class="err">。</span>
<span class="n">CPU</span><span class="err">访问不同类型节点内存的速度是不相同的，访问本地节点的速度最快，访问远端节点的速度最慢，即访问速度与节点的距离有关，距离越远访问速度越慢，此距离称作</span><span class="n">Node</span> <span class="n">Distance</span><span class="err">。应用程序要尽量的减少不通</span><span class="n">CPU</span><span class="err">模块之间的交互，如果应用程序能有方法固定在一个</span><span class="n">CPU</span><span class="err">模块里，那么应用的性能将会有很大的提升。</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
</pre></td><td class="rouge-code"><pre><span class="nl">https:</span><span class="c1">//www.xiexianbin.cn/linux/commands/numactl/index.html</span>
<span class="n">numactl</span><span class="err">使用方法</span>
</pre></td></tr></tbody></table></code></div></div>

<h3 id="二-numactl使用的syscall"><span class="me-2">二、 numactl使用的syscall</span><a href="#二-numactl使用的syscall" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3>
<p>numactl用于设置进程的调度或内存绑定策略，所有子项继承设置的策略。此外，它还可以设置共享内存段或文件的内存策略。该工具可用于查看当前服务器的NUMA节点配置、状态，可通过该工具将进程绑定到指定CPU core，由指定CPU core来运行对应进程。</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre><span class="nl">https:</span><span class="c1">//linux.die.net/man/</span>
</pre></td></tr></tbody></table></code></div></div>

<h4 id="1set_mempolicy"><span class="me-2">（1）set_mempolicy</span><a href="#1set_mempolicy" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4>

<p>设置进程的默认numa策略。</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="c1">//set default NUMA memory policy for a process and its children</span>
<span class="cp">#include</span> <span class="cpf">&lt;numaif.h&gt;</span><span class="cp">
</span><span class="kt">int</span> <span class="nf">set_mempolicy</span><span class="p">(</span><span class="kt">int</span> <span class="n">mode</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="o">*</span><span class="n">nodemask</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">maxnode</span><span class="p">);</span>
<span class="n">Link</span> <span class="n">with</span> <span class="o">-</span><span class="n">lnuma</span><span class="p">.</span>
</pre></td></tr></tbody></table></code></div></div>

<h4 id="2get_mempolicy"><span class="me-2">（2）get_mempolicy</span><a href="#2get_mempolicy" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4>

<p>获取进程的numa策略。</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="c1">//retrieves the NUMA policy of the calling thread or of a memory address, depending on the setting of flags.</span>
<span class="cp">#include</span> <span class="cpf">&lt;numaif.h&gt;</span><span class="cp">
</span><span class="kt">int</span> <span class="nf">get_mempolicy</span><span class="p">(</span><span class="kt">int</span> <span class="o">*</span><span class="n">mode</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="o">*</span><span class="n">nodemask</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">maxnode</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">addr</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">flags</span><span class="p">);</span>
<span class="n">Link</span> <span class="n">with</span> <span class="o">-</span><span class="n">lnuma</span><span class="p">.</span>
</pre></td></tr></tbody></table></code></div></div>

<h4 id="3mbind"><span class="me-2">（3）mbind</span><a href="#3mbind" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4>

<p>设置内存的内存策略。</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="c1">//set memory policy for a memory range</span>
<span class="cp">#include</span> <span class="cpf">&lt;numaif.h&gt;</span><span class="cp">
</span><span class="kt">int</span> <span class="nf">mbind</span><span class="p">(</span><span class="kt">void</span> <span class="o">*</span><span class="n">addr</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">len</span><span class="p">,</span> <span class="kt">int</span> <span class="n">mode</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="o">*</span><span class="n">nodemask</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">maxnode</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="n">flags</span><span class="p">);</span>
<span class="n">Link</span> <span class="n">with</span> <span class="o">-</span><span class="n">lnuma</span><span class="p">.</span>
</pre></td></tr></tbody></table></code></div></div>

<h4 id="4migrate_pages"><span class="me-2">（4）migrate_pages</span><a href="#4migrate_pages" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4>

<p>迁移所有的page到另一个node上。</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="c1">//move all pages in a process to another set of nodes</span>
<span class="cp">#include</span> <span class="cpf">&lt;numaif.h&gt;</span><span class="cp">
</span><span class="kt">long</span> <span class="nf">migrate_pages</span><span class="p">(</span><span class="kt">int</span> <span class="n">pid</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">maxnode</span><span class="p">,</span> <span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="o">*</span><span class="n">old_nodes</span><span class="p">,</span> <span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="o">*</span><span class="n">new_nodes</span><span class="p">);</span>
<span class="n">Link</span> <span class="n">with</span> <span class="o">-</span><span class="n">lnuma</span><span class="p">.</span>
</pre></td></tr></tbody></table></code></div></div>

<h4 id="5move_pages"><span class="me-2">（5）move_pages</span><a href="#5move_pages" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4>

<p>迁移单个page到另一个node上。</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="c1">//move individual pages of a process to another node</span>
<span class="cp">#include</span> <span class="cpf">&lt;numaif.h&gt;</span><span class="cp">
</span><span class="kt">long</span> <span class="nf">move_pages</span><span class="p">(</span><span class="kt">int</span> <span class="n">pid</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="n">count</span><span class="p">,</span> <span class="kt">void</span> <span class="o">**</span><span class="n">pages</span><span class="p">,</span> <span class="k">const</span> <span class="kt">int</span> <span class="o">*</span><span class="n">nodes</span><span class="p">,</span> <span class="kt">int</span> <span class="o">*</span><span class="n">status</span><span class="p">,</span> <span class="kt">int</span> <span class="n">flags</span><span class="p">);</span>
<span class="n">Link</span> <span class="n">with</span> <span class="o">-</span><span class="n">lnuma</span><span class="p">.</span>
</pre></td></tr></tbody></table></code></div></div>

<h4 id="6sched_setaffinitysched_getaffinity"><span class="me-2">（6）sched_setaffinity/sched_getaffinity</span><a href="#6sched_setaffinitysched_getaffinity" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h4>

<p>设置/获取进程CPU亲和性Mask;</p>

<p>若pid = 0? calling process的CPU亲和性Mask？</p>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
</pre></td><td class="rouge-code"><pre><span class="c1">//set and get a process's CPU affinity mask;If pid is zero, then the mask of the calling process is returned</span>
<span class="kt">int</span> <span class="nf">sched_setaffinity</span><span class="p">(</span><span class="n">pid_t</span> <span class="n">pid</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">cpusetsize</span><span class="p">,</span> <span class="n">cpu_set_t</span> <span class="o">*</span><span class="n">mask</span><span class="p">);</span>
<span class="kt">int</span> <span class="nf">sched_getaffinity</span><span class="p">(</span><span class="n">pid_t</span> <span class="n">pid</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">cpusetsize</span><span class="p">,</span> <span class="n">cpu_set_t</span> <span class="o">*</span><span class="n">mask</span><span class="p">);</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
</pre></td><td class="rouge-code"><pre><span class="n">numactl</span> <span class="p">[</span><span class="o">--</span><span class="n">interleave</span> <span class="n">nodes</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">preferred</span> <span class="n">node</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">membind</span> <span class="n">nodes</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">cpunodebind</span> <span class="n">nodes</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">physcpubind</span> <span class="n">cpus</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">localalloc</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="p">]</span> <span class="p">{</span><span class="n">arguments</span> <span class="p">...}</span>
<span class="n">numactl</span> <span class="o">--</span><span class="n">show</span>
<span class="n">numactl</span> <span class="o">--</span><span class="n">hardware</span>
<span class="n">numactl</span> <span class="p">[</span><span class="o">--</span><span class="n">huge</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">offset</span> <span class="n">offset</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">shmmode</span> <span class="n">shmmode</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">length</span> <span class="n">length</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">strict</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">shmid</span> <span class="n">id</span><span class="p">]</span> <span class="o">--</span><span class="n">shm</span> <span class="n">shmkeyfile</span> <span class="o">|</span> <span class="o">--</span><span class="n">file</span> <span class="n">tmpfsfile</span>
<span class="p">[</span><span class="o">--</span><span class="n">touch</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dump</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">dump</span><span class="o">-</span><span class="n">nodes</span><span class="p">]</span> <span class="n">memory</span> <span class="n">policy</span>
</pre></td></tr></tbody></table></code></div></div>

<h3 id="三numactl命令行"><span class="me-2">三、numactl命令行</span><a href="#三numactl命令行" class="anchor text-muted"><i class="fas fa-hashtag"></i></a></h3>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="rouge-code"><pre><span class="nl">usage:</span> <span class="n">numactl</span> <span class="p">[</span><span class="o">--</span><span class="n">all</span> <span class="o">|</span> <span class="o">-</span><span class="n">a</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">interleave</span><span class="o">=</span> <span class="o">|</span> <span class="o">-</span><span class="n">i</span> <span class="o">&lt;</span><span class="n">nodes</span><span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">preferred</span><span class="o">=</span> <span class="o">|</span> <span class="o">-</span><span class="n">p</span> <span class="o">&lt;</span><span class="n">node</span><span class="o">&gt;</span><span class="p">]</span>
               <span class="p">[</span><span class="o">--</span><span class="n">physcpubind</span><span class="o">=</span> <span class="o">|</span> <span class="o">-</span><span class="n">C</span> <span class="o">&lt;</span><span class="n">cpus</span><span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">cpunodebind</span><span class="o">=</span> <span class="o">|</span> <span class="o">-</span><span class="n">N</span> <span class="o">&lt;</span><span class="n">nodes</span><span class="o">&gt;</span><span class="p">]</span>
               <span class="p">[</span><span class="o">--</span><span class="n">membind</span><span class="o">=</span> <span class="o">|</span> <span class="o">-</span><span class="n">m</span> <span class="o">&lt;</span><span class="n">nodes</span><span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">localalloc</span> <span class="o">|</span> <span class="o">-</span><span class="n">l</span><span class="p">]</span> <span class="n">command</span> <span class="n">args</span> <span class="p">...</span>
       <span class="n">numactl</span> <span class="p">[</span><span class="o">--</span><span class="n">show</span> <span class="o">|</span> <span class="o">-</span><span class="n">s</span><span class="p">]</span>
       <span class="n">numactl</span> <span class="p">[</span><span class="o">--</span><span class="n">hardware</span> <span class="o">|</span> <span class="o">-</span><span class="n">H</span><span class="p">]</span>
       <span class="n">numactl</span> <span class="p">[</span><span class="o">--</span><span class="n">length</span> <span class="o">|</span> <span class="o">-</span><span class="n">l</span> <span class="o">&lt;</span><span class="n">length</span><span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">offset</span> <span class="o">|</span> <span class="o">-</span><span class="n">o</span> <span class="o">&lt;</span><span class="n">offset</span><span class="o">&gt;</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">shmmode</span> <span class="o">|</span> <span class="o">-</span><span class="n">M</span> <span class="o">&lt;</span><span class="n">shmmode</span><span class="o">&gt;</span><span class="p">]</span>
               <span class="p">[</span><span class="o">--</span><span class="n">strict</span> <span class="o">|</span> <span class="o">-</span><span class="n">t</span><span class="p">]</span>
               <span class="p">[</span><span class="o">--</span><span class="n">shmid</span> <span class="o">|</span> <span class="o">-</span><span class="n">I</span> <span class="o">&lt;</span><span class="n">id</span><span class="o">&gt;</span><span class="p">]</span> <span class="o">--</span><span class="n">shm</span> <span class="o">|</span> <span class="o">-</span><span class="n">S</span> <span class="o">&lt;</span><span class="n">shmkeyfile</span><span class="o">&gt;</span>
               <span class="p">[</span><span class="o">--</span><span class="n">shmid</span> <span class="o">|</span> <span class="o">-</span><span class="n">I</span> <span class="o">&lt;</span><span class="n">id</span><span class="o">&gt;</span><span class="p">]</span> <span class="o">--</span><span class="n">file</span> <span class="o">|</span> <span class="o">-</span><span class="n">f</span> <span class="o">&lt;</span><span class="n">tmpfsfile</span><span class="o">&gt;</span>
               <span class="p">[</span><span class="o">--</span><span class="n">huge</span> <span class="o">|</span> <span class="o">-</span><span class="n">u</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">touch</span> <span class="o">|</span> <span class="o">-</span><span class="n">T</span><span class="p">]</span> 
               <span class="n">memory</span> <span class="n">policy</span> <span class="o">|</span> <span class="o">--</span><span class="n">dump</span> <span class="o">|</span> <span class="o">-</span><span class="n">d</span> <span class="o">|</span> <span class="o">--</span><span class="n">dump</span><span class="o">-</span><span class="n">nodes</span> <span class="o">|</span> <span class="o">-</span><span class="n">D</span>

<span class="n">memory</span> <span class="n">policy</span> <span class="n">is</span> <span class="o">--</span><span class="n">interleave</span> <span class="o">|</span> <span class="o">-</span><span class="n">i</span><span class="p">,</span> <span class="o">--</span><span class="n">preferred</span> <span class="o">|</span> <span class="o">-</span><span class="n">p</span><span class="p">,</span> <span class="o">--</span><span class="n">membind</span> <span class="o">|</span> <span class="o">-</span><span class="n">m</span><span class="p">,</span> <span class="o">--</span><span class="n">localalloc</span> <span class="o">|</span> <span class="o">-</span><span class="n">l</span>
<span class="o">&lt;</span><span class="n">nodes</span><span class="o">&gt;</span> <span class="n">is</span> <span class="n">a</span> <span class="n">comma</span> <span class="n">delimited</span> <span class="n">list</span> <span class="n">of</span> <span class="n">node</span> <span class="n">numbers</span> <span class="n">or</span> <span class="n">A</span><span class="o">-</span><span class="n">B</span> <span class="n">ranges</span> <span class="n">or</span> <span class="n">all</span><span class="p">.</span>
<span class="n">Instead</span> <span class="n">of</span> <span class="n">a</span> <span class="n">number</span> <span class="n">a</span> <span class="n">node</span> <span class="n">can</span> <span class="n">also</span> <span class="n">be</span><span class="o">:</span>
  <span class="n">netdev</span><span class="o">:</span><span class="n">DEV</span> <span class="n">the</span> <span class="n">node</span> <span class="n">connected</span> <span class="n">to</span> <span class="n">network</span> <span class="n">device</span> <span class="n">DEV</span>
  <span class="n">file</span><span class="o">:</span><span class="n">PATH</span>  <span class="n">the</span> <span class="n">node</span> <span class="n">the</span> <span class="n">block</span> <span class="n">device</span> <span class="n">of</span> <span class="n">path</span> <span class="n">is</span> <span class="n">connected</span> <span class="n">to</span>
  <span class="n">ip</span><span class="o">:</span><span class="n">HOST</span>    <span class="n">the</span> <span class="n">node</span> <span class="n">of</span> <span class="n">the</span> <span class="n">network</span> <span class="n">device</span> <span class="n">host</span> <span class="n">routes</span> <span class="n">through</span>
  <span class="n">block</span><span class="o">:</span><span class="n">PATH</span> <span class="n">the</span> <span class="n">node</span> <span class="n">of</span> <span class="n">block</span> <span class="n">device</span> <span class="n">path</span>
  <span class="n">pci</span><span class="o">:</span><span class="p">[</span><span class="n">seg</span><span class="o">:</span><span class="p">]</span><span class="n">bus</span><span class="o">:</span><span class="n">dev</span><span class="p">[</span><span class="o">:</span><span class="n">func</span><span class="p">]</span> <span class="n">The</span> <span class="n">node</span> <span class="n">of</span> <span class="n">a</span> <span class="n">PCI</span> <span class="n">device</span>
<span class="o">&lt;</span><span class="n">cpus</span><span class="o">&gt;</span> <span class="n">is</span> <span class="n">a</span> <span class="n">comma</span> <span class="n">delimited</span> <span class="n">list</span> <span class="n">of</span> <span class="n">cpu</span> <span class="n">numbers</span> <span class="n">or</span> <span class="n">A</span><span class="o">-</span><span class="n">B</span> <span class="n">ranges</span> <span class="n">or</span> <span class="n">all</span>
<span class="n">all</span> <span class="n">ranges</span> <span class="n">can</span> <span class="n">be</span> <span class="n">inverted</span> <span class="n">with</span> <span class="o">!</span>
<span class="n">all</span> <span class="n">numbers</span> <span class="n">and</span> <span class="n">ranges</span> <span class="n">can</span> <span class="n">be</span> <span class="n">made</span> <span class="n">cpuset</span><span class="o">-</span><span class="n">relative</span> <span class="n">with</span> <span class="o">+</span>
<span class="n">the</span> <span class="n">old</span> <span class="o">--</span><span class="n">cpubind</span> <span class="n">argument</span> <span class="n">is</span> <span class="n">deprecated</span><span class="p">.</span>
<span class="n">use</span> <span class="o">--</span><span class="n">cpunodebind</span> <span class="n">or</span> <span class="o">--</span><span class="n">physcpubind</span> <span class="n">instead</span>
<span class="o">&lt;</span><span class="n">length</span><span class="o">&gt;</span> <span class="n">can</span> <span class="n">have</span> <span class="n">g</span> <span class="p">(</span><span class="n">GB</span><span class="p">),</span> <span class="n">m</span> <span class="p">(</span><span class="n">MB</span><span class="p">)</span> <span class="n">or</span> <span class="n">k</span> <span class="p">(</span><span class="n">KB</span><span class="p">)</span> <span class="n">suffixes</span>
      
<span class="mi">1</span> <span class="err">交织分配模式</span>
<span class="err">使用</span> <span class="o">--</span><span class="n">interleave</span> <span class="err">参数，如占用内存的</span><span class="n">mongodb</span><span class="err">程序，共享所有</span> <span class="n">node</span> <span class="err">内存：</span>

<span class="n">numactl</span> <span class="o">--</span><span class="n">interleave</span><span class="o">=</span><span class="n">all</span> <span class="n">mongod</span> <span class="o">-</span><span class="n">f</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">mongod</span><span class="p">.</span><span class="n">conf</span>
<span class="err">也可参考</span> <span class="o">&lt;</span><span class="n">Mongo</span> <span class="n">Sharding</span> <span class="err">集群配置</span><span class="o">&gt;</span><span class="err">中配置</span> <span class="n">rs</span> <span class="err">启动脚本</span>

<span class="mi">2</span> <span class="err">内存绑定</span>
<span class="n">numactl</span> <span class="o">--</span><span class="n">cpunodebind</span><span class="o">=</span><span class="mi">0</span> <span class="o">--</span><span class="n">membind</span><span class="o">=</span><span class="mi">0</span> <span class="n">python</span> <span class="n">param</span>
<span class="n">numactl</span> <span class="o">--</span><span class="n">physcpubind</span><span class="o">=</span><span class="mi">0</span> <span class="o">--</span><span class="n">membind</span><span class="o">=</span><span class="mi">0</span> <span class="n">python</span> <span class="n">param</span>
<span class="mi">3</span> <span class="n">CPU</span><span class="err">绑定</span>
<span class="n">numactl</span> <span class="o">-</span><span class="n">C</span> <span class="mi">0</span><span class="o">-</span><span class="mi">1</span> <span class="p">.</span><span class="o">/</span><span class="n">test</span>
<span class="err">将应用程序</span><span class="n">test</span><span class="err">绑定到</span><span class="mi">0</span><span class="o">~</span><span class="mi">1</span><span class="err">核上运行</span>
      
<span class="mi">1</span><span class="p">.</span><span class="err">缺省</span><span class="p">(</span><span class="k">default</span><span class="p">)</span><span class="err">：总是在本地节点分配（分配在当前进程运行的节点上）；</span>
<span class="mi">2</span><span class="p">.</span><span class="err">绑定</span><span class="p">(</span><span class="n">bind</span><span class="p">)</span><span class="err">：强制分配到指定节点上；</span>
<span class="mi">3</span><span class="p">.</span><span class="err">交叉</span><span class="p">(</span><span class="n">interleave</span><span class="p">)</span><span class="err">：在所有节点或者指定的节点上交织分配；</span>
<span class="mi">4</span><span class="p">.</span><span class="err">优先</span><span class="p">(</span><span class="n">preferred</span><span class="p">)</span><span class="err">：在指定节点上分配，失败则在其他节点上分配。</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="rouge-code"><pre><span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">node3</span><span class="p">]</span><span class="err">$</span> <span class="n">numactl</span> <span class="o">-</span><span class="n">H</span>
<span class="n">available</span><span class="o">:</span> <span class="mi">4</span> <span class="n">nodes</span> <span class="p">(</span><span class="mi">0</span><span class="o">-</span><span class="mi">3</span><span class="p">)</span>
<span class="n">node</span> <span class="mi">0</span> <span class="n">cpus</span><span class="o">:</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span> <span class="mi">11</span> <span class="mi">12</span> <span class="mi">13</span> <span class="mi">14</span> <span class="mi">15</span> <span class="mi">16</span> <span class="mi">17</span> <span class="mi">18</span> <span class="mi">19</span> <span class="mi">20</span> <span class="mi">21</span> <span class="mi">22</span> <span class="mi">23</span> <span class="mi">24</span> <span class="mi">25</span> <span class="mi">26</span> <span class="mi">27</span> <span class="mi">28</span> <span class="mi">29</span> <span class="mi">30</span> <span class="mi">31</span>
<span class="n">node</span> <span class="mi">0</span> <span class="n">size</span><span class="o">:</span> <span class="mi">64847</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">0</span> <span class="n">free</span><span class="o">:</span> <span class="mi">6721</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">1</span> <span class="n">cpus</span><span class="o">:</span> <span class="mi">32</span> <span class="mi">33</span> <span class="mi">34</span> <span class="mi">35</span> <span class="mi">36</span> <span class="mi">37</span> <span class="mi">38</span> <span class="mi">39</span> <span class="mi">40</span> <span class="mi">41</span> <span class="mi">42</span> <span class="mi">43</span> <span class="mi">44</span> <span class="mi">45</span> <span class="mi">46</span> <span class="mi">47</span> <span class="mi">48</span> <span class="mi">49</span> <span class="mi">50</span> <span class="mi">51</span> <span class="mi">52</span> <span class="mi">53</span> <span class="mi">54</span> <span class="mi">55</span> <span class="mi">56</span> <span class="mi">57</span> <span class="mi">58</span> <span class="mi">59</span> <span class="mi">60</span> <span class="mi">61</span> <span class="mi">62</span> <span class="mi">63</span>
<span class="n">node</span> <span class="mi">1</span> <span class="n">size</span><span class="o">:</span> <span class="mi">65465</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">1</span> <span class="n">free</span><span class="o">:</span> <span class="mi">5235</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">2</span> <span class="n">cpus</span><span class="o">:</span> <span class="mi">64</span> <span class="mi">65</span> <span class="mi">66</span> <span class="mi">67</span> <span class="mi">68</span> <span class="mi">69</span> <span class="mi">70</span> <span class="mi">71</span> <span class="mi">72</span> <span class="mi">73</span> <span class="mi">74</span> <span class="mi">75</span> <span class="mi">76</span> <span class="mi">77</span> <span class="mi">78</span> <span class="mi">79</span> <span class="mi">80</span> <span class="mi">81</span> <span class="mi">82</span> <span class="mi">83</span> <span class="mi">84</span> <span class="mi">85</span> <span class="mi">86</span> <span class="mi">87</span> <span class="mi">88</span> <span class="mi">89</span> <span class="mi">90</span> <span class="mi">91</span> <span class="mi">92</span> <span class="mi">93</span> <span class="mi">94</span> <span class="mi">95</span>
<span class="n">node</span> <span class="mi">2</span> <span class="n">size</span><span class="o">:</span> <span class="mi">65465</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">2</span> <span class="n">free</span><span class="o">:</span> <span class="mi">5753</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">3</span> <span class="n">cpus</span><span class="o">:</span> <span class="mi">96</span> <span class="mi">97</span> <span class="mi">98</span> <span class="mi">99</span> <span class="mi">100</span> <span class="mi">101</span> <span class="mi">102</span> <span class="mi">103</span> <span class="mi">104</span> <span class="mi">105</span> <span class="mi">106</span> <span class="mi">107</span> <span class="mi">108</span> <span class="mi">109</span> <span class="mi">110</span> <span class="mi">111</span> <span class="mi">112</span> <span class="mi">113</span> <span class="mi">114</span> <span class="mi">115</span> <span class="mi">116</span> <span class="mi">117</span> <span class="mi">118</span> <span class="mi">119</span> <span class="mi">120</span> <span class="mi">121</span> <span class="mi">122</span> <span class="mi">123</span> <span class="mi">124</span> <span class="mi">125</span> <span class="mi">126</span> <span class="mi">127</span>
<span class="n">node</span> <span class="mi">3</span> <span class="n">size</span><span class="o">:</span> <span class="mi">64440</span> <span class="n">MB</span>
<span class="n">node</span> <span class="mi">3</span> <span class="n">free</span><span class="o">:</span> <span class="mi">19081</span> <span class="n">MB</span>
<span class="n">node</span> <span class="n">distances</span><span class="o">:</span>
<span class="n">node</span>   <span class="mi">0</span>   <span class="mi">1</span>   <span class="mi">2</span>   <span class="mi">3</span> 
  <span class="mi">0</span><span class="o">:</span>  <span class="mi">10</span>  <span class="mi">16</span>  <span class="mi">32</span>  <span class="mi">33</span> 
  <span class="mi">1</span><span class="o">:</span>  <span class="mi">16</span>  <span class="mi">10</span>  <span class="mi">25</span>  <span class="mi">32</span> 
  <span class="mi">2</span><span class="o">:</span>  <span class="mi">32</span>  <span class="mi">25</span>  <span class="mi">10</span>  <span class="mi">16</span> 
  <span class="mi">3</span><span class="o">:</span>  <span class="mi">33</span>  <span class="mi">32</span>  <span class="mi">16</span>  <span class="mi">10</span> 

    <span class="o">-&gt;|</span> <span class="n">nopolicy</span>
    <span class="o">-&gt;|</span> <span class="n">hardware</span>
      <span class="o">-&gt;|</span> <span class="n">numa_node_size64</span> <span class="c1">///sys/devices/system/node/node%d/meminfo 获取node的total/free</span>
	<span class="cm">/*----------------------------------------------------------------------*/</span>
      <span class="o">-&gt;|</span> <span class="n">print_node_cpus</span>
      	<span class="o">-&gt;|</span> <span class="n">numa_node_to_cpus</span> <span class="c1">///sys/devices/system/node/node%d/cpumap 获取node的cpumask</span>
	<span class="cm">/*----------------------------------------------------------------------*/</span>
      <span class="o">-&gt;|</span> <span class="n">print_distances</span>
      	<span class="o">-&gt;|</span> <span class="n">numa_distance</span>
      		<span class="o">-&gt;|</span> <span class="n">read_distance_table</span> <span class="c1">////sys/devices/system/node/node%d/distance 获取node与node的距离</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="rouge-code"><pre><span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">node3</span><span class="p">]</span><span class="err">$</span> <span class="n">numactl</span> <span class="o">-</span><span class="n">s</span>
<span class="n">policy</span><span class="o">:</span> <span class="k">default</span>
<span class="n">preferred</span> <span class="n">node</span><span class="o">:</span> <span class="n">current</span>
<span class="n">physcpubind</span><span class="o">:</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span> <span class="mi">7</span> <span class="mi">8</span> <span class="mi">9</span> <span class="mi">10</span> <span class="mi">11</span> <span class="mi">12</span> <span class="mi">13</span> <span class="mi">14</span> <span class="mi">15</span> <span class="mi">16</span> <span class="mi">17</span> <span class="mi">18</span> <span class="mi">19</span> <span class="mi">20</span> <span class="mi">21</span> <span class="mi">22</span> <span class="mi">23</span> <span class="mi">24</span> <span class="mi">25</span> <span class="mi">26</span> <span class="mi">27</span> <span class="mi">28</span> <span class="mi">29</span> <span class="mi">30</span> <span class="mi">31</span> <span class="mi">32</span> <span class="mi">33</span> <span class="mi">34</span> <span class="mi">35</span> <span class="mi">36</span> <span class="mi">37</span> <span class="mi">38</span> <span class="mi">39</span> <span class="mi">40</span> <span class="mi">41</span> <span class="mi">42</span> <span class="mi">43</span> <span class="mi">44</span> <span class="mi">45</span> <span class="mi">46</span> <span class="mi">47</span> <span class="mi">48</span> <span class="mi">49</span> <span class="mi">50</span> <span class="mi">51</span> <span class="mi">52</span> <span class="mi">53</span> <span class="mi">54</span> <span class="mi">55</span> <span class="mi">56</span> <span class="mi">57</span> <span class="mi">58</span> <span class="mi">59</span> <span class="mi">60</span> <span class="mi">61</span> <span class="mi">62</span> <span class="mi">63</span> <span class="mi">64</span> <span class="mi">65</span> <span class="mi">66</span> <span class="mi">67</span> <span class="mi">68</span> <span class="mi">69</span> <span class="mi">70</span> <span class="mi">71</span> <span class="mi">72</span> <span class="mi">73</span> <span class="mi">74</span> <span class="mi">75</span> <span class="mi">76</span> <span class="mi">77</span> <span class="mi">78</span> <span class="mi">79</span> <span class="mi">80</span> <span class="mi">81</span> <span class="mi">82</span> <span class="mi">83</span> <span class="mi">84</span> <span class="mi">85</span> <span class="mi">86</span> <span class="mi">87</span> <span class="mi">88</span> <span class="mi">89</span> <span class="mi">90</span> <span class="mi">91</span> <span class="mi">92</span> <span class="mi">93</span> <span class="mi">94</span> <span class="mi">95</span> <span class="mi">96</span> <span class="mi">97</span> <span class="mi">98</span> <span class="mi">99</span> <span class="mi">100</span> <span class="mi">101</span> <span class="mi">102</span> <span class="mi">103</span> <span class="mi">104</span> <span class="mi">105</span> <span class="mi">106</span> <span class="mi">107</span> <span class="mi">108</span> <span class="mi">109</span> <span class="mi">110</span> <span class="mi">111</span> <span class="mi">112</span> <span class="mi">113</span> <span class="mi">114</span> <span class="mi">115</span> <span class="mi">116</span> <span class="mi">117</span> <span class="mi">118</span> <span class="mi">119</span> <span class="mi">120</span> <span class="mi">121</span> <span class="mi">122</span> <span class="mi">123</span> <span class="mi">124</span> <span class="mi">125</span> <span class="mi">126</span> <span class="mi">127</span> 
<span class="n">cpubind</span><span class="o">:</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> 
<span class="n">nodebind</span><span class="o">:</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> 
<span class="n">membind</span><span class="o">:</span> <span class="mi">0</span> <span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> 

    <span class="o">-&gt;|</span> <span class="n">show</span>
    	<span class="o">-&gt;|</span><span class="n">numa_get_run_node_mask</span>  <span class="c1">//sched_getaffinity + /sys/devices/system/node/node%d/cpumap = affinity_node</span>
    	<span class="o">-&gt;|</span><span class="n">numa_preferred</span> <span class="c1">//get_mempolicy(policy, &amp;bmp) -&gt; policy</span>
		<span class="o">-&gt;|</span><span class="n">numa_get_interleave_mask</span>
    	<span class="o">-&gt;|</span><span class="n">numa_get_membind</span> <span class="c1">//get_mempolicy(policy, &amp;bmp) -&gt; bmp</span>
		<span class="o">-&gt;|</span><span class="n">numa_get_interleave_node</span>


</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="rouge-code"><pre><span class="kt">void</span> <span class="nf">__attribute__</span><span class="p">((</span><span class="n">constructor</span><span class="p">))</span>
<span class="n">numa_init</span>
	<span class="o">-&gt;|</span><span class="n">set_sizes</span> 
		<span class="cm">/* &lt;/proc/self/status Mems_allowed:\tnum &gt; nodemask_t的size，
		 * 即系统支持最大node数2^CONFIG_NODES_SHIFT
          */</span>
        <span class="o">-&gt;|</span><span class="n">set_nodemask_size</span><span class="p">();</span>	<span class="cm">/* size of kernel nodemask_t */</span>

		<span class="cm">/* 遍历&lt;/sys/devices/system/node&gt; 
		 * [环境最大node号:maxconfigurednode],
		 * [环境所有的nodemask numa_nodes_ptr],
		 * [有可用内存的nodemask numa_memnode_ptr] 
		 */</span>
        <span class="o">-&gt;|</span><span class="n">set_configured_nodes</span><span class="p">();</span>	<span class="cm">/* configured nodes listed in /sys */</span>

		<span class="cm">/* sched_getaffinity [获取cpumask_t的size cpumask_sz], 
		 * 即系统支持最大CPU数CONFIG_NR_CPUS
          */</span>
        <span class="o">-&gt;|</span><span class="n">set_numa_max_cpu</span><span class="p">();</span>	<span class="cm">/* size of kernel cpumask_t */</span>

		<span class="cm">/* sysconf(_SC_NPROCESSORS_CONF) [获取最大配置CPU maxconfiguredcpu ] */</span>
        <span class="o">-&gt;|</span><span class="n">set_configured_cpus</span><span class="p">();</span>	<span class="cm">/* cpus listed in /sys/devices/system/cpu */</span>

        <span class="cm">/* &lt;/proc/self/status&gt; 
         * [Cpus_allowed:  numa_all_cpus_ptr], 进程可用的CPU Mask
         * [Mems_allowed: numa_all_nodes_ptr], 进程可用的Node Mask
         * [maxconfigurednode-&gt;numa_possible_nodes_ptr], 根据最大node号(1 &lt;&lt; maxconfigurednode)得到的possible NodeMask
         * [maxconfiguredcpu-&gt;numa_possible_cpus_ptr], 根据最大的CPU号(1 &lt;&lt; maxconfiguredcpu)得的possible CpuMask 
         */</span>
        <span class="o">-&gt;|</span><span class="n">set_task_constraints</span><span class="p">();</span> <span class="cm">/* cpus and nodes for current task */</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="c1">//sysV share memory Segment</span>
<span class="n">https</span><span class="o">:</span><span class="c1">//flylib.com/books/en/1.393.1.140/1/</span>

<span class="n">Shared</span> <span class="n">memory</span> <span class="n">provides</span> <span class="n">an</span> <span class="n">efficient</span> <span class="n">way</span> <span class="n">to</span> <span class="n">share</span> <span class="n">large</span> <span class="n">amounts</span> <span class="n">of</span> <span class="n">data</span> <span class="n">between</span> <span class="n">processes</span><span class="p">.</span> <span class="n">Shared</span> <span class="n">memory</span> <span class="n">is</span> <span class="n">one</span> <span class="n">of</span> <span class="n">the</span> <span class="n">most</span> <span class="n">important</span> <span class="n">resources</span> <span class="n">the</span> <span class="n">IPC</span> <span class="n">facility</span> <span class="n">provides</span> <span class="n">because</span> <span class="n">it</span> <span class="n">is</span> <span class="n">heavily</span> <span class="n">used</span> <span class="n">in</span> <span class="n">many</span> <span class="n">database</span> <span class="n">applications</span><span class="p">.</span> <span class="n">A</span> <span class="n">SysV</span> <span class="n">shared</span> <span class="n">memory</span> <span class="n">segment</span> <span class="n">is</span> <span class="n">created</span> <span class="n">by</span> <span class="n">the</span> <span class="n">shmget</span><span class="p">()</span> <span class="n">system</span> <span class="n">call</span><span class="p">.</span> <span class="n">After</span> <span class="n">the</span> <span class="n">shared</span> <span class="n">memory</span> <span class="n">segment</span> <span class="n">is</span> <span class="n">created</span><span class="p">,</span> <span class="n">a</span> <span class="n">process</span> <span class="n">can</span> <span class="n">attach</span> <span class="n">itself</span> <span class="n">to</span> <span class="n">the</span> <span class="n">shared</span> <span class="n">memory</span> <span class="n">segment</span> <span class="n">by</span> <span class="n">issuing</span> <span class="n">a</span> <span class="n">shmat</span><span class="p">()</span><span class="n">system</span> <span class="n">call</span><span class="p">.</span> <span class="n">Then</span> <span class="n">the</span> <span class="n">process</span> <span class="n">can</span> <span class="n">perform</span> <span class="n">operations</span> <span class="p">(</span><span class="n">read</span> <span class="n">or</span> <span class="n">write</span><span class="p">)</span> <span class="n">on</span> <span class="n">it</span><span class="p">.</span> <span class="n">The</span> <span class="n">process</span> <span class="n">can</span> <span class="n">detach</span> <span class="n">itself</span> <span class="n">from</span> <span class="n">the</span> <span class="n">memory</span> <span class="n">segment</span> <span class="n">by</span> <span class="n">a</span> <span class="n">shmdt</span><span class="p">()</span> <span class="n">system</span> <span class="n">call</span><span class="p">.</span> <span class="n">Because</span> <span class="n">shared</span> <span class="n">memory</span> <span class="n">provides</span> <span class="n">a</span> <span class="n">common</span> <span class="n">resource</span> <span class="k">for</span> <span class="n">multiple</span> <span class="n">processes</span><span class="p">,</span> <span class="n">it</span> <span class="n">is</span> <span class="n">often</span> <span class="n">used</span> <span class="n">with</span> <span class="n">semaphores</span> <span class="n">to</span> <span class="n">prevent</span> <span class="n">collisions</span><span class="p">.</span>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre>
</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre></td><td class="rouge-code"><pre><span class="p">[</span><span class="n">root</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">numactl</span> <span class="o">-</span><span class="n">m</span> <span class="mi">0</span> <span class="o">-</span><span class="n">C</span> <span class="mi">0</span> <span class="n">top</span><span class="o">&amp;</span>
<span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="mi">596490</span>
 <span class="c1">//查看进程的内存申请</span>
<span class="p">[</span><span class="n">root</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="mi">597865</span><span class="o">/</span><span class="n">numa_maps</span> <span class="o">|</span> <span class="n">grep</span> <span class="s">"N[0-9]"</span> 
<span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="err">`</span><span class="n">pidof</span> <span class="n">top</span><span class="err">`</span><span class="o">/</span><span class="n">numa_maps</span> <span class="o">|</span> <span class="n">grep</span> <span class="s">"N[0-9]"</span>
<span class="n">aaada7450000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">top</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">2</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">2</span> <span class="n">N1</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">aaada7470000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">top</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">aaada7480000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">top</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">aaada7490000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">aaadc6d30000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">heap</span> <span class="n">anon</span><span class="o">=</span><span class="mi">3</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">3</span> <span class="n">N0</span><span class="o">=</span><span class="mi">3</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dcb0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libnuma</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">11</span> <span class="n">N1</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dcc0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libnuma</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dcd0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libnuma</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dd00000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_CTYPE</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">2</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">77</span> <span class="n">N0</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dd60000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_NUMERIC</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dd70000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_TIME</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6dd80000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_COLLATE</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">3</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">3</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e000000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_MONETARY</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e010000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_MESSAGES</span><span class="o">/</span><span class="n">SYS_LC_MESSAGES</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e020000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_PAPER</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e030000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_NAME</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e040000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_ADDRESS</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e050000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_TELEPHONE</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e060000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgpg</span><span class="o">-</span><span class="n">error</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">26</span><span class="p">.</span><span class="mi">1</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">2</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">67</span> <span class="n">N0</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e080000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgpg</span><span class="o">-</span><span class="n">error</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">26</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e090000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgpg</span><span class="o">-</span><span class="n">error</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">26</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e0a0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgcc_s</span><span class="o">-</span><span class="mi">7</span><span class="p">.</span><span class="mi">3</span><span class="p">.</span><span class="mi">0</span><span class="o">-</span><span class="mi">20190804</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">86</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e0c0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgcc_s</span><span class="o">-</span><span class="mi">7</span><span class="p">.</span><span class="mi">3</span><span class="p">.</span><span class="mi">0</span><span class="o">-</span><span class="mi">20190804</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e0d0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgcc_s</span><span class="o">-</span><span class="mi">7</span><span class="p">.</span><span class="mi">3</span><span class="p">.</span><span class="mi">0</span><span class="o">-</span><span class="mi">20190804</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e0e0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgcrypt</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">20</span><span class="p">.</span><span class="mi">2</span><span class="p">.</span><span class="mi">3</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">3</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">67</span> <span class="n">N0</span><span class="o">=</span><span class="mi">3</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e1a0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgcrypt</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">20</span><span class="p">.</span><span class="mi">2</span><span class="p">.</span><span class="mi">3</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e1b0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libgcrypt</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">20</span><span class="p">.</span><span class="mi">2</span><span class="p">.</span><span class="mi">3</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e1c0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">liblz4</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="mi">9</span><span class="p">.</span><span class="mi">2</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">66</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e200000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">liblz4</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="mi">9</span><span class="p">.</span><span class="mi">2</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e210000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">liblz4</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">1</span><span class="p">.</span><span class="mi">9</span><span class="p">.</span><span class="mi">2</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e220000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">liblzma</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">5</span><span class="p">.</span><span class="mi">2</span><span class="p">.</span><span class="mi">4</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">67</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e250000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">liblzma</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">5</span><span class="p">.</span><span class="mi">2</span><span class="p">.</span><span class="mi">4</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e260000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">liblzma</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">5</span><span class="p">.</span><span class="mi">2</span><span class="p">.</span><span class="mi">4</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e270000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">librt</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">71</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e280000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">librt</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e290000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">librt</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e2a0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libpthread</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">2</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">128</span> <span class="n">N0</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e2c0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libpthread</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e2d0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libpthread</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e2e0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libc</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">17</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">198</span> <span class="n">N0</span><span class="o">=</span><span class="mi">17</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e450000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libc</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e460000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libc</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e470000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libdl</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">131</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e480000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libdl</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e490000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libdl</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e4a0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libtinfo</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">6</span><span class="p">.</span><span class="mi">1</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">3</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">51</span> <span class="n">N0</span><span class="o">=</span><span class="mi">3</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e4d0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libtinfo</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">6</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e4e0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libtinfo</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">6</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e4f0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libncurses</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">6</span><span class="p">.</span><span class="mi">1</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">3</span> <span class="n">N1</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e520000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libncurses</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">6</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e530000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libncurses</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">6</span><span class="p">.</span><span class="mi">1</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e540000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libsystemd</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">27</span><span class="p">.</span><span class="mi">0</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">2</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">57</span> <span class="n">N0</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e5f0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libsystemd</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">27</span><span class="p">.</span><span class="mi">0</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e600000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libsystemd</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">27</span><span class="p">.</span><span class="mi">0</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e610000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libprocps</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">8</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">2</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">2</span> <span class="n">N1</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e630000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libprocps</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">8</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">2</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e640000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">libprocps</span><span class="p">.</span><span class="n">so</span><span class="p">.</span><span class="mi">8</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">2</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e650000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e660000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_MEASUREMENT</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e670000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">gconv</span><span class="o">/</span><span class="n">gconv</span><span class="o">-</span><span class="n">modules</span><span class="p">.</span><span class="n">cache</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">78</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e6a0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">ld</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">2</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">197</span> <span class="n">N0</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e6c0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">locale</span><span class="o">/</span><span class="n">en_US</span><span class="p">.</span><span class="n">utf8</span><span class="o">/</span><span class="n">LC_IDENTIFICATION</span> <span class="n">mapped</span><span class="o">=</span><span class="mi">1</span> <span class="n">mapmax</span><span class="o">=</span><span class="mi">76</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e6d0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">ld</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">fffc6e6e0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">file</span><span class="o">=/</span><span class="n">usr</span><span class="o">/</span><span class="n">lib64</span><span class="o">/</span><span class="n">ld</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">28</span><span class="p">.</span><span class="n">so</span> <span class="n">anon</span><span class="o">=</span><span class="mi">1</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">1</span> <span class="n">N0</span><span class="o">=</span><span class="mi">1</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="n">ffffd2cb0000</span> <span class="n">bind</span><span class="o">:</span><span class="mi">0</span> <span class="n">stack</span> <span class="n">anon</span><span class="o">=</span><span class="mi">2</span> <span class="n">dirty</span><span class="o">=</span><span class="mi">2</span> <span class="n">N0</span><span class="o">=</span><span class="mi">2</span> <span class="n">kernelpagesize_kB</span><span class="o">=</span><span class="mi">64</span>
<span class="c1">//查看program运行的cpu</span>
<span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="err">`</span><span class="n">pidof</span> <span class="n">top</span><span class="err">`</span><span class="o">/</span><span class="n">status</span> <span class="o">|</span><span class="n">grep</span> <span class="n">Cpus_allowed_list</span>
<span class="n">Cpus_allowed_list</span><span class="o">:</span>	<span class="mi">0</span>
<span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">ps</span> <span class="o">-</span><span class="n">o</span> <span class="n">pid</span><span class="p">,</span><span class="n">psr</span><span class="p">,</span><span class="n">comm</span> <span class="o">-</span><span class="n">p</span> <span class="err">`</span><span class="n">pidof</span> <span class="n">top</span><span class="err">`</span>
    <span class="n">PID</span> <span class="n">PSR</span> <span class="n">COMMAND</span>
 <span class="mi">599842</span>   <span class="mi">0</span> <span class="n">top</span>
<span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">ps</span> <span class="o">-</span><span class="n">o</span> <span class="n">pid</span><span class="p">,</span><span class="n">psr</span><span class="p">,</span><span class="n">comm</span> <span class="o">-</span><span class="n">p</span> <span class="err">`</span><span class="n">pidof</span> <span class="n">top</span><span class="err">`</span>
    <span class="n">PID</span> <span class="n">PSR</span> <span class="n">COMMAND</span>
 <span class="mi">599842</span>   <span class="mi">0</span> <span class="n">top</span>
<span class="p">[</span><span class="n">csluo</span><span class="err">@</span><span class="n">localhost</span> <span class="n">numactl</span><span class="p">]</span><span class="err">$</span> <span class="n">ps</span> <span class="o">-</span><span class="n">o</span> <span class="n">pid</span><span class="p">,</span><span class="n">psr</span><span class="p">,</span><span class="n">comm</span> <span class="o">-</span><span class="n">p</span> <span class="err">`</span><span class="n">pidof</span> <span class="n">top</span><span class="err">`</span>
    <span class="n">PID</span> <span class="n">PSR</span> <span class="n">COMMAND</span>
 <span class="mi">599842</span>   <span class="mi">0</span> <span class="n">top</span>

</pre></td></tr></tbody></table></code></div></div>

<div class="language-c highlighter-rouge"><div class="code-header">
        <span data-label-text="C"><i class="fas fa-code fa-fw small"></i></span>
      <button aria-label="copy" data-title-succeed="Copied!"><i class="far fa-clipboard"></i></button></div><div class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
</pre></td><td class="rouge-code"><pre><span class="cp">#0  0x0000ffffafe5db04 in strstr () from /usr/lib64/libc.so.6
</span><span class="p">(</span><span class="n">gdb</span><span class="p">)</span> <span class="n">bt</span>
<span class="cp">#0  0x0000ffffafe5db04 in strstr () from /usr/lib64/libc.so.6
#1  0x0000000000401ed8 in add_pids_from_pattern_search (pattern=pattern@entry=0x0) at numastat.c:1319
#2  0x00000000004012e8 in main (argc=1, argv=0xffffdd7413c8) at numastat.c:1399
</span></pre></td></tr></tbody></table></code></div></div>


</div>

<div class="post-tail-wrapper text-muted">

  <!-- categories -->
  
  <div class="post-meta mb-3">
    <i class="far fa-folder-open fa-fw me-1"></i>
    
      <a href='/categories/package/'>Package</a>,
      <a href='/categories/numactl/'>Numactl</a>
  </div>
  
  <!-- post.html -->

  <!-- tags -->
  
  <div class="post-tags">
    <i class="fa fa-tags fa-fw me-1"></i>
      
      <a href="/tags/numactl/"
          class="post-tag no-text-decoration" >Numactl</a>
      
  </div>
  
  
  <div class="post-tail-bottom
    d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
    <div class="license-wrapper">

      

        

        This post is licensed under 
        <a href="https://creativecommons.org/licenses/by/4.0/">
          CC BY 4.0
        </a>
         by the author.

      
    </div>

    <!-- Post sharing snippet -->

<div class="share-wrapper">
  <span class="share-label text-muted me-1">Share</span>
  <span class="share-icons">
    
    
    

    
      
      <a
        href="https://twitter.com/intent/tweet?text=Numactl%20-%20Cheng%20Luo&url=https%3A%2F%2Fluochenglcs.github.io%2Fposts%2Fnumactl%2F"
        data-bs-toggle="tooltip"
        data-bs-placement="top"
        title="Twitter"
        target="_blank"
        rel="noopener"
        aria-label="Twitter"
      >
        <i class="fa-fw fab fa-twitter"></i>
      </a>
    
      
      <a
        href="https://www.facebook.com/sharer/sharer.php?title=Numactl%20-%20Cheng%20Luo&u=https%3A%2F%2Fluochenglcs.github.io%2Fposts%2Fnumactl%2F"
        data-bs-toggle="tooltip"
        data-bs-placement="top"
        title="Facebook"
        target="_blank"
        rel="noopener"
        aria-label="Facebook"
      >
        <i class="fa-fw fab fa-facebook-square"></i>
      </a>
    
      
      <a
        href="https://t.me/share/url?url=https%3A%2F%2Fluochenglcs.github.io%2Fposts%2Fnumactl%2F&text=Numactl%20-%20Cheng%20Luo"
        data-bs-toggle="tooltip"
        data-bs-placement="top"
        title="Telegram"
        target="_blank"
        rel="noopener"
        aria-label="Telegram"
      >
        <i class="fa-fw fab fa-telegram"></i>
      </a>
    

    <i
      id="copy-link"
      class="fa-fw fas fa-link small"
      data-bs-toggle="tooltip"
      data-bs-placement="top"
      title="Copy link"
      data-title-succeed="Link copied successfully!"
    >
    </i>
  </span>
</div>


  </div><!-- .post-tail-bottom -->

</div><!-- div.post-tail-wrapper -->


      
    
      
    </div>
  </div>
  <!-- #core-wrapper -->

  <!-- panel -->
  <div id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
    <div class="access">
      <!-- Get the last 5 posts from lastmod list. -->














  <div id="access-lastmod" class="post">
    <div class="panel-heading">Recently Updated</div>
    <ul class="post-content list-unstyled ps-0 pb-1 ms-1 mt-2">
      
        
        
        
        <li class="text-truncate lh-lg">
          <a href="/posts/%E5%86%85%E5%AD%98%E6%95%B0%E6%8D%AE%E5%BA%93/">MMDB (memory database)</a>
        </li>
      
        
        
        
        <li class="text-truncate lh-lg">
          <a href="/posts/userspace-rcu%E9%94%81/">userspace rcu lock</a>
        </li>
      
        
        
        
        <li class="text-truncate lh-lg">
          <a href="/posts/Real-time-operating-system/">Realtime Operating System</a>
        </li>
      
        
        
        
        <li class="text-truncate lh-lg">
          <a href="/posts/HUNDSUN-LightOS/">Hundsun Lightos</a>
        </li>
      
        
        
        
        <li class="text-truncate lh-lg">
          <a href="/posts/linux-struct-folio/">struct folio</a>
        </li>
      
    </ul>
  </div>
  <!-- #access-lastmod -->


      <!-- The trending tags list -->















  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
        
        

  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
        
        

  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        



  <div id="access-tags">
    <div class="panel-heading">Trending Tags</div>
    <div class="d-flex flex-wrap mt-3 mb-1 me-3">
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/lock/">lock</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/libumem/">libumem</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/mm/">mm</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/autonuma/">autonuma</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/bfs/">BFS</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/bus/">Bus</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/caladan/">caladan</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/damon/">damon</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/deep-learning/">Deep Learning</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/dma/">DMA</a>
      
    </div>
  </div>


    </div>

    
      
      



  <div id="toc-wrapper" class="ps-0 pe-4 mb-5">
    <div class="panel-heading ps-3 pt-2 mb-2">Contents</div>
    <nav id="toc"><ul><li>Numactl<ul><li><a href="#一-numa技术">一 NUMA技术</a></li><li><a href="#二-numactl使用的syscall">二、 numactl使用的syscall</a><ul><li><a href="#1set_mempolicy">（1）set_mempolicy</a></li><li><a href="#2get_mempolicy">（2）get_mempolicy</a></li><li><a href="#3mbind">（3）mbind</a></li><li><a href="#4migrate_pages">（4）migrate_pages</a></li><li><a href="#5move_pages">（5）move_pages</a></li><li><a href="#6sched_setaffinitysched_getaffinity">（6）sched_setaffinity/sched_getaffinity</a></li></ul></li><li><a href="#三numactl命令行">三、numactl命令行</a></li></ul></li></ul></li></ul></nav>
  </div>
  


    
  </div>
</div>

<!-- tail -->

  <div class="row">
    <div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-3 pe-xl-4 mt-5">
      
        
        <!--
  Recommend the other 3 posts according to the tags and categories of the current post,
  if the number is not enough, use the other latest posts to supplement.
-->

<!-- The total size of related posts -->


<!-- An random integer that bigger than 0 -->


<!-- Equals to TAG_SCORE / {max_categories_hierarchy} -->








  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  
    
  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  






<!-- Fill with the other newlest posts -->





  <div id="related-posts" class="mb-2 mb-sm-4">
    <h3 class="pt-2 mb-4 ms-1" data-toc-skip>
      Further Reading
    </h3>
    <div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4">
      
        
        
        <div class="col">
          <a href="/posts/numad-start-failed/" class="card post-preview h-100">
            <div class="card-body">
              <!--
  Date format snippet
  See: ${JS_ROOT}/utils/locale-dateime.js
-->





<em
  class="small"
  data-ts="1600323000"
  data-df="ll"
  
>
  Sep 17, 2020
</em>

              <h4 class="pt-0 my-2" data-toc-skip>numad systemctl start failed</h4>
              <div class="text-muted small">
                <p>
                  





                  1 systemct start failed
1、R9 x86环境systemctl启动失败

● numad.service - numad - The NUMA daemon that manages application locality.
   Loaded: loaded (/usr/lib/systemd/system/numad.service; disabled; ven...
                </p>
              </div>
            </div>
          </a>
        </div>
      
        
        
        <div class="col">
          <a href="/posts/sunos-mdb/" class="card post-preview h-100">
            <div class="card-body">
              <!--
  Date format snippet
  See: ${JS_ROOT}/utils/locale-dateime.js
-->





<em
  class="small"
  data-ts="1603152000"
  data-df="ll"
  
>
  Oct 20, 2020
</em>

              <h4 class="pt-0 my-2" data-toc-skip>Modular Debugger (MDB)</h4>
              <div class="text-muted small">
                <p>
                  





                  适用于linux系统的mdb：
https://github.com/luochenglcs/mdb

If the code is useful to you - great !. Spread it around and get people to use, debug and enhance it.

一、libumem_ready赋值

umem_update_variables
 ...
                </p>
              </div>
            </div>
          </a>
        </div>
      
        
        
        <div class="col">
          <a href="/posts/sunos-libumem/" class="card post-preview h-100">
            <div class="card-body">
              <!--
  Date format snippet
  See: ${JS_ROOT}/utils/locale-dateime.js
-->





<em
  class="small"
  data-ts="1612310400"
  data-df="ll"
  
>
  Feb  3, 2021
</em>

              <h4 class="pt-0 my-2" data-toc-skip>user space slab memory allocator - libumem</h4>
              <div class="text-muted small">
                <p>
                  





                  对应github：
https://github.com/luochenglcs/libumem

reference:
https://arrowpig1979.wordpress.com/2008/08/16/%e4%bd%bf%e7%94%a8libumem%e5%ae%9a%e4%bd%8dmemory-leak%e5%92%8cmemory-corruption%ef%bc%884...
                </p>
              </div>
            </div>
          </a>
        </div>
      
    </div>
    <!-- .card-deck -->
  </div>
  <!-- #related-posts -->


      
        
        <!-- Navigation buttons at the bottom of the post. -->

<div class="post-navigation d-flex justify-content-between">
  
    <a
      href="/posts/linux-page_idle-bitmap/"
      class="btn btn-outline-primary"
      prompt="Older"
    >
      <p>Kernel Page_Idle</p>
    </a>
  

  
    <a
      href="/posts/Interesting-scheduler-BFS/"
      class="btn btn-outline-primary"
      prompt="Newer"
    >
      <p>Interesting Kernel Scheduler - BFS</p>
    </a>
  
</div>

      
        
        <!--  The comments switcher -->


      
    </div>
  </div>


        <!-- The Search results -->

<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
  <div class="col-11 post-content">
    <div id="search-hints">
      <!-- The trending tags list -->















  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
        
        

  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
        
        

  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        

  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
    
  
    
    
    
    
      
        
        



  <div id="access-tags">
    <div class="panel-heading">Trending Tags</div>
    <div class="d-flex flex-wrap mt-3 mb-1 me-3">
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/lock/">lock</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/libumem/">libumem</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/mm/">mm</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/autonuma/">autonuma</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/bfs/">BFS</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/bus/">Bus</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/caladan/">caladan</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/damon/">damon</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/deep-learning/">Deep Learning</a>
      
        
        <a class="post-tag btn btn-outline-primary" href="/tags/dma/">DMA</a>
      
    </div>
  </div>


    </div>
    <div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
  </div>
</div>

      </div>
    </div>

    <!-- The Footer -->

<footer>
  <div class="container px-lg-4">
    <div class="d-flex justify-content-center align-items-center text-muted mx-md-3">
      <p>Using the <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a> theme <a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
      </p>

      <p>©
        2023
        <a href="https://gitee.com/luochenglcs">luochunsheng</a>.
        
          <span
            data-bs-toggle="tooltip"
            data-bs-placement="top"
            title="Except where otherwise noted, the blog posts on this site are licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author."
          >Some rights reserved.</span>
        
      </p>
    </div>
  </div>
</footer>


    <div id="mask"></div>

    <button id="back-to-top" aria-label="back-to-top" class="btn btn-lg btn-box-shadow">
      <i class="fas fa-angle-up"></i>
    </button>

    
      <div
        id="notification"
        class="toast"
        role="alert"
        aria-live="assertive"
        aria-atomic="true"
        data-bs-animation="true"
        data-bs-autohide="false"
      >
        <div class="toast-header">
          <button
            type="button"
            class="btn-close ms-auto"
            data-bs-dismiss="toast"
            aria-label="Close"
          ></button>
        </div>
        <div class="toast-body text-center pt-0">
          <p class="px-2 mb-3">A new version of content is available.</p>
          <button type="button" class="btn btn-primary" aria-label="Update">
            Update
          </button>
        </div>
      </div>
    

    <!-- JS selector for site. -->

<!-- commons -->



<!-- layout specified -->


  

  
    <!-- image lazy-loading & popup & clipboard -->
    
  















  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  

  
    

    

  



  <script src="https://cdn.jsdelivr.net/combine/npm/jquery@3.7.0/dist/jquery.min.js,npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js,npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js,npm/lazysizes@5.3.2/lazysizes.min.js,npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js,npm/clipboard@2.0.11/dist/clipboard.min.js,npm/dayjs@1.11.7/dayjs.min.js,npm/dayjs@1.11.7/locale/en.min.js,npm/dayjs@1.11.7/plugin/relativeTime.min.js,npm/dayjs@1.11.7/plugin/localizedFormat.min.js,npm/tocbot@4.21.0/dist/tocbot.min.js"></script>






<script defer src="/assets/js/dist/post.min.js"></script>






    

    <!--
  Jekyll Simple Search loader
  See: <https://github.com/christian-fei/Simple-Jekyll-Search>
-->





<script>
  /* Note: dependent library will be loaded in `js-selector.html` */
  SimpleJekyllSearch({
    searchInput: document.getElementById('search-input'),
    resultsContainer: document.getElementById('search-results'),
    json: '/assets/js/data/search.json',
    searchResultTemplate: '<div class="px-1 px-sm-2 px-lg-4 px-xl-0">  <a href="{url}">{title}</a>  <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">    {categories}    {tags}  </div>  <p>{snippet}</p></div>',
    noResultsText: '<p class="mt-5"></p>',
    templateMiddleware: function(prop, value, template) {
      if (prop === 'categories') {
        if (value === '') {
          return `${value}`;
        } else {
          return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
        }
      }

      if (prop === 'tags') {
        if (value === '') {
          return `${value}`;
        } else {
          return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
        }
      }
    }
  });
</script>

  </body>
</html>

